package Infoglobo.Intranet.ImportacaoUsuario;

import lumis.portal.PortalException;
import lumis.portal.UnexpectedException;
import lumis.portal.authentication.SessionConfig;
import lumis.portal.clock.ClockConfig;
import lumis.portal.dao.jdbc.ITransactionJdbc;
import lumis.portal.service.GenericServiceClock;
import lumis.portal.service.ServiceException;
import lumis.portal.transaction.PortalTransactionFactory;

public class ClockImportaUsuario extends GenericServiceClock
{
	public void doTick(SessionConfig sessionConfig, ClockConfig clockConfig) throws ServiceException, PortalException
	{
	ImportaXmlLumis objImportaXmlLumis;
	
	ITransactionJdbc trn = (ITransactionJdbc) PortalTransactionFactory.getTransaction();
	trn.begin();
	try
		{
		objImportaXmlLumis = new ImportaXmlLumis();
		objImportaXmlLumis.Importa(trn, sessionConfig, false);
		objImportaXmlLumis = null;
		trn.commit();
		}
	catch(Exception e)
		{
		trn.rollback();
		throw new UnexpectedException(e);
		}
	trn.dispose();
	return;
	}
}
